how to solve for different variables